import request from './request'

// 请求首页的数据
export const Getlogin = (params) => request.post('/api/user/login',params)
// 图片列表
export const Getlist = (token,limit,curPage,month) => request.get(`/api/image/list?curPage=${curPage}&limit=${limit}&month=${month}&token=${token}`)
// export const Getlist = (params) => request.get(`/api/image/list`,)
// 保存
export const Upload = (name,token,params,config) => request.post(`/api/image/save?name=${name}&token=${token}`,params,config)

// 删除
export const Delete = (id,token) => request.delete(`/api/image/delete/${id}?token=${token}`)
// 根据id查询链接
export const Getinfo = (id,token) => request.get(`/api/image/info/${id}?token=${token}`)


// 搜索功能




export default {Getlogin,Getlist,Upload,Delete,Getinfo}